package com.tweetgraph.controller;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.tweetgraph.util.TwitterSearchUtil;

public class TwitterSearch extends HttpServlet {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1251578449153781578L;


	/**
	 * 
	 */
	public void doGet(HttpServletRequest req,HttpServletResponse resp){
		String tag = req.getParameter("hashTag");
		
		if(tag != null && !"".equals(tag)){
			TwitterSearchUtil.processTwitterQuery(tag);
		}
		resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
	}
	
	
	public void doPost(HttpServletRequest req,HttpServletResponse resp){
		doGet(req,resp);
	}
	
	
	
}
